<div>
	<div class="span810">
		<h2>Danh sách cửa hàng</h2>
	</div>
</div>
<div class="row">
	<div class="span4">
		<div class="well sidebar-nav">
			<h3>Tỉnh thành</h3>
			<ul>
				<li><?php echo CHtml::link('Cả nước', array('shops'), array('style' => 'color:#002366')); ?></li>
				<?php foreach ($locations as $location): ?>
					<li><?php echo CHtml::link($location->name, array('shops','location'=>$location->id), array('style' => 'color:#002366')); ?></li>
				<?php endforeach;?>
			</ul>
		</div>
	</div>
	<div class="span8">
		<ul class="list-layout">
			<?php if (sizeof($shops)): ?>
				<?php foreach ($shops as $shop): ?>
					<li>
						<div id="wrapper">
							<a href="<?php echo Yii::app()->createUrl('site/shop_details', array('id' => $shop->id)); ?>">
								<?php if(strpos($shop->image, 'http') === 0):?>
									<img title="<?php ?>" src="<?php echo $shop->image ?>" style="max-height: 83px"/>
								<?php else:?>
									<img title="<?php ?>" src="<?php echo Yii::app()->request->baseUrl . '/' . $shop->image ?>"/>
								<?php endif;?>
							</a>
							<div class="item-list-detail">
								<span><?php echo $shop->name ?></span>
								<span><a href="<?php echo $shop->website ?>" target="_blank"><?php echo $shop->website ?></a></span>
								<span><a href="<?php echo Yii::app()->createUrl('site/shop_details', array('id' => $shop->id)); ?>">Chi tiết</a></span>
							</div>
						</div>
					</li>
				<?php endforeach; ?>
			<?php else: ?>
				<tr>
					<td>Không tìm thấy cửa hàng nào</td>
				</tr>
			<?php endif; ?>
		</ul>
		<div style="margin: 0px auto; width: 100%">
			<?php $this->widget('CLinkPager', array('pages' => $pages)); ?>	
		</div>
	</div>
</div>
